package com.dongrj.framework.sftp;

import com.jcraft.jsch.ChannelSftp;
import org.apache.commons.pool2.PooledObjectFactory;
import org.apache.commons.pool2.impl.GenericObjectPool;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;

public class SftpPool extends GenericObjectPool<ChannelSftp> {

    public SftpPool(PooledObjectFactory<ChannelSftp> factory) {
        super(factory);
    }

    public SftpPool(PooledObjectFactory<ChannelSftp> factory, GenericObjectPoolConfig<ChannelSftp> config) {
        super(factory, config);
    }

    @Override
    public void returnObject(ChannelSftp obj) {
        if (obj != null) {
            super.returnObject(obj);
        }
    }
}
